| Filename | (eval 1089)[/usr/share/perl5/Sub/Quote.pm:5] |
| Statements | Executed 0 statements in 0s |
| Eval Invoked At | /usr/share/perl5/Sub/Quote.pm line 5 |
| Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
| Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
|---|---|---|---|---|---|
| 3 | 2 | 2 | 46µs | 1.26ms | Method::Generate::Constructor::new |
| 1 | 1 | 1 | 16µs | 32µs | Sub::Quote::BEGIN@4.2910 |
| 1 | 1 | 1 | 7µs | 7µs | Method::Generate::Constructor::BEGIN@10 |
| Line | State ments |
Time on line |
Calls | Time in subs |
Code |
|---|---|---|---|---|---|
| 1 | { | ||||
| 2 | my $_QUOTED = ${$_[1]->{"\$_QUOTED"}}; | ||||
| 3 | my $_UNQUOTED = ${$_[1]->{"\$_UNQUOTED"}}; | ||||
| 4 | 2 | 47µs | # spent 32µs (16+16) within Sub::Quote::BEGIN@4.2910 which was called:
# once (16µs+16µs) by Sub::Quote::_clean_eval at line 4 # spent 32µs making 1 call to Sub::Quote::BEGIN@4.2910
# spent 16µs making 1 call to warnings::unimport | ||
| 5 | # spent 1.26ms (46µs+1.21) within Method::Generate::Constructor::new which was called 3 times, avg 418µs/call:
# 2 times (14µs+1.19ms) by Moo::_constructor_maker_for at line 201 of Moo.pm, avg 603µs/call
# once (32µs+16µs) by Moo::_constructor_maker_for at line 56 of Sub/Defer.pm | ||||
| 6 | $_QUOTED if 0; | ||||
| 7 | $_UNQUOTED if 0; | ||||
| 8 | # BEGIN quote_sub PRELUDE | ||||
| 9 | package Method::Generate::Constructor; | ||||
| 10 | # spent 7µs within Method::Generate::Constructor::BEGIN@10 which was called:
# once (7µs+0s) by Sub::Quote::_clean_eval at line 15 | ||||
| 11 | $^H = "2018"; | ||||
| 12 | ${^WARNING_BITS} = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"; | ||||
| 13 | %^H = ( | ||||
| 14 | ); | ||||
| 15 | 1 | 7µs | } # spent 7µs making 1 call to Method::Generate::Constructor::BEGIN@10 | ||
| 16 | # END quote_sub PRELUDE | ||||
| 17 | my $class = shift; | ||||
| 18 | $class = ref($class) if ref($class); | ||||
| 19 | if ($class ne "Method::Generate::Constructor") { | ||||
| 20 | if ($Moo::MAKERS{$class}) { | ||||
| 21 | if ($Moo::MAKERS{$class}{constructor}) { | ||||
| 22 | return $class->Method::Generate::Constructor::SUPER::new(@_); | ||||
| 23 | } | ||||
| 24 | Moo->_constructor_maker_for($class); | ||||
| 25 | return $class->new(@_); | ||||
| 26 | } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) { | ||||
| 27 | return $meta->new_object( | ||||
| 28 | $class->can("BUILDARGS") ? $class->BUILDARGS(@_) | ||||
| 29 | : $class->Moo::Object::BUILDARGS(@_) | ||||
| 30 | ); | ||||
| 31 | } | ||||
| 32 | } | ||||
| 33 | my $args; | ||||
| 34 | if ( scalar @_ == 1 ) { | ||||
| 35 | unless ( defined $_[0] && ref $_[0] eq 'HASH' ) { | ||||
| 36 | die "Single parameters to new() must be a HASH ref" | ||||
| 37 | ." data => ". $_[0] ."\n"; | ||||
| 38 | } | ||||
| 39 | $args = { %{ $_[0] } }; | ||||
| 40 | } | ||||
| 41 | elsif ( @_ % 2 ) { | ||||
| 42 | die "The new() method for $class expects a hash reference or a" | ||||
| 43 | . " key/value list. You passed an odd number of arguments\n"; | ||||
| 44 | } | ||||
| 45 | else { | ||||
| 46 | $args = {@_}; | ||||
| 47 | } | ||||
| 48 | 1 | 13µs | my $new = $class->next::method(@_); # spent 13µs making 1 call to next::method | ||
| 49 | if (exists $args->{"accessor_generator"}) { | ||||
| 50 | $new->{"accessor_generator"} = $args->{"accessor_generator"}; | ||||
| 51 | } | ||||
| 52 | if (exists $args->{"attribute_specs"}) { | ||||
| 53 | $new->{"attribute_specs"} = $args->{"attribute_specs"}; | ||||
| 54 | } | ||||
| 55 | if (exists $args->{"construction_builder"}) { | ||||
| 56 | $new->{"construction_builder"} = $args->{"construction_builder"}; | ||||
| 57 | } | ||||
| 58 | if (exists $args->{"construction_string"}) { | ||||
| 59 | $new->{"construction_string"} = $args->{"construction_string"}; | ||||
| 60 | } | ||||
| 61 | if (exists $args->{"package"}) { | ||||
| 62 | $new->{"package"} = $args->{"package"}; | ||||
| 63 | } | ||||
| 64 | if (exists $args->{"subconstructor_handler"}) { | ||||
| 65 | $new->{"subconstructor_handler"} = $args->{"subconstructor_handler"}; | ||||
| 66 | } | ||||
| 67 | return $new; | ||||
| 68 | } | ||||
| 69 | $$_UNQUOTED = \&Method::Generate::Constructor::new | ||||
| 70 | } | ||||
| 71 | 1; | ||||
| 72 | |||||
| 73 | ; |